package com.boot.dao;

import com.boot.entity.Purchapply;
import com.boot.entity.PurchapplyCheck;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 采购申请Dao
 */
@Mapper
public interface PurchaseRequestDao {
    List<Purchapply> listPurchaseApply(@Param("purchapplyStatus") String purchapplyStatus, @Param("documentNumber") String documentNumber,@Param("powerName") String powerName,@Param("companyId") Integer companyId);

    Map<String, Object> getPurchaseDetail(Integer purchapplyId);

    Map<String, Object> getDetailName(Integer purchapplyId);

    Map<String, Object> getCoalQualityMap(Integer purchapplyId);

    List<Map<String, Object>> getPurchaseApplyAuditList(Integer purchapplyId);

    Map<String, Object> getPurchaseApplyCreateInfo(Integer purchapplyId);

    Boolean auditPurchaseApply(PurchapplyCheck purchapplyCheck);

    Integer getAuditAgreeCount(@Param("purchapplyId") Integer purchapplyId, @Param("checkOpinion") String checkOpinion);

    Boolean updatePurchapplyStatus(@Param("purchapplyId") Integer purchapplyId,@Param("status") String status);
}
